﻿// ==UserScript==
// @name ISP_history
// @description Scroll history of ticket to bottom in techsupport in BILLmanager
// @author yumaa@ispsystem.com
// @include https://my.ispsystem.com/manager/*
// ==/UserScript==

(function() {
if (window.location.hostname != 'my.ispsystem.com') return;

	opera.addEventListener('BeforeEvent.DOMContentLoaded', function(e) {
		
		var first_tab = $id("fphead_0");
		if ( first_tab )
			first_tab.addEventListener('click', function (e) {
				var hist = $id("htmldata-hist");
				if (hist)
					hist.scrollTop = hist.scrollHeight; //setTimeout("hist.scrollTop = hist.scrollHeight", 100);
			}, false);
		
	}, true);
})();
